package com.foreveross.fetl.core.domain.freight.hbase;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.foreveross.fetl.common.domain.BaseHBaseEntity;
import com.foreveross.fetl.common.jpa.annontation.HBaseColumn;

/**
 * 回程航班信息模型
 * 回程也是会有中转回程这种情况的
 * @author guokenye
 *
 */
@javax.persistence.Table(name="CRAWL_PLANE_FREIGHT")
public class ReturnTripEntity extends BaseHBaseEntity{
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -8877458619026275645L;
	/**
	 * 所属航班
	 */
	@ManyToOne
	private PlaneInfoEntity planeInfoEntity;
	/**
	 * 运营商简称英文，如：MU
	 */
	@HBaseColumn(qualifier="returnTripCarrierKey",family="planeinfo")
	private String carrierKey;

	/**
	 * 运营商简称中文，如：南航
	 */
	@HBaseColumn(qualifier="returnTripCarrierName",family="planeinfo")
	private String carrierName;

	/**
	 * 运营商全名，如：中国海南航空公司
	 */
	@HBaseColumn(qualifier="returnTripCarrierFullName",family="planeinfo")
	private String carrierFullName;
	/**
	 * 航班号
	 */
	@HBaseColumn(qualifier="returnTripFlightNo",family="planeinfo")
	private String flightNo;
	/**
	 *出发城市编码
	 */
	@HBaseColumn(qualifier="returnTripFromCityCode",family="planeinfo")
	private String fromCity ;
	/**
	 *到达城市 编码
	 */
	@HBaseColumn(qualifier="returnTripToCityCode",family="planeinfo")
	private String toCity;
	/**
	 *出发城市名称
	 */
	@HBaseColumn(qualifier="returnTripFromCityName",family="planeinfo")
	private String fromCityName ;
	/**
	 *到达城市名称
	 */
	@HBaseColumn(qualifier="returnTripToCityName",family="planeinfo")
	private String toCityName;
	/**
	 *起飞机场
	 */
	@HBaseColumn(qualifier="returnTripFromAir",family="planeinfo")
	private String fromAir;
	/**
	 *到达机场
	 */
	@HBaseColumn(qualifier="returnTripToAir",family="planeinfo")
	private String toAir;
	/**
	 * 航班批次日期。如:2012-05-19,格式:yyyy-MM-dd
	 * 作为回程也是有日期的
	 */
	@HBaseColumn(qualifier="returnTripFlightBatchDate",family="planeinfo")
	private String flightDate;
	/**
	 * 航班起飞时间
	 */
	@HBaseColumn(qualifier="returnTripFlightBatchStartTime",family="planeinfo", format="yyyyMMddHHmmss")
	private Date startTime;
	/**
	 * 航班预计到达时间
	 */
	@HBaseColumn(qualifier="returnTripFlightBatchEndTime",family="planeinfo", format="yyyyMMddHHmmss")
	private Date endTime;
	/**
	 * 往返程价
	 * 去程+回程的最低总价
	 */
	@HBaseColumn(qualifier="totalPrice",family="planeinfo")
	private Double totalPrice;
	 /**
	 * 中转
	 * 回程也会有中转
	 */
	@OneToMany
	@HBaseColumn(qualifier="returnTransit",family="planeinfo")
	private List<TransitchangeEntity> transit = new ArrayList<TransitchangeEntity>();
	
	
	public ReturnTripEntity(){}
	
	@Override
	public String generateRowKey() {
		return planeInfoEntity.generateRowKey();
	}
	public PlaneInfoEntity getPlaneInfoEntity() {
		return planeInfoEntity;
	}
	public void setPlaneInfoEntity(PlaneInfoEntity planeInfoEntity) {
		this.planeInfoEntity = planeInfoEntity;
	}
	public String getCarrierKey() {
		return carrierKey;
	}
	public void setCarrierKey(String carrierKey) {
		this.carrierKey = carrierKey;
	}
	public String getCarrierName() {
		return carrierName;
	}
	public void setCarrierName(String carrierName) {
		this.carrierName = carrierName;
	}
	public String getCarrierFullName() {
		return carrierFullName;
	}
	public void setCarrierFullName(String carrierFullName) {
		this.carrierFullName = carrierFullName;
	}
	public String getFlightNo() {
		return flightNo;
	}
	public void setFlightNo(String flightNo) {
		this.flightNo = flightNo;
	}
	public String getFromCity() {
		return fromCity;
	}
	public void setFromCity(String fromCity) {
		this.fromCity = fromCity;
	}
	public String getToCity() {
		return toCity;
	}
	public void setToCity(String toCity) {
		this.toCity = toCity;
	}
	
	public String getFromCityName() {
		return fromCityName;
	}
	public void setFromCityName(String fromCityName) {
		this.fromCityName = fromCityName;
	}
	public String getToCityName() {
		return toCityName;
	}
	public void setToCityName(String toCityName) {
		this.toCityName = toCityName;
	}
	public String getFromAir() {
		return fromAir;
	}
	public void setFromAir(String fromAir) {
		this.fromAir = fromAir;
	}
	public String getToAir() {
		return toAir;
	}
	public void setToAir(String toAir) {
		this.toAir = toAir;
	}
	public String getFlightDate() {
		return flightDate;
	}
	public void setFlightDate(String flightDate) {
		this.flightDate = flightDate;
	}
	public Date getStartTime() {
		return startTime;
	}
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public List<TransitchangeEntity> getTransit() {
		return transit;
	}
	public void setTransit(List<TransitchangeEntity> transit) {
		this.transit = transit;
	}
	public Double getTotalPrice() {
		return totalPrice;
	}
	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}
	
	
	
}
